package com.rst.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.codehaus.jackson.annotate.JsonIgnoreProperties;

@Entity
@Table(name="t_exam_groups")
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
public class ExamGroups {

	public static final int ACTIVE = 1;
	public static final int INACTIVE = 0;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name="f_id")
	private Long id;	

	@Column(name="f_name")
	private String name;

	@Column(name="f_exam_type")
	private String examType;

	@Column(name="f_is_published")
	private Boolean isPublished;	
	
	@Column(name="f_result_published")
	private Boolean resultPublished;	

	@Column(name="f_section_id")
	private String sectionId;

	@Column(name="f_exam_date")  
	private Date examDate;

	@Column(name="f_status")
	private Integer status;
	
	
	@OneToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="f_section_id", nullable=false, insertable=false, updatable=false)
	private Section section ;


	public Long getId() {
		return id;
	}


	public void setId(Long id) {
		this.id = id;
	}


	public String getName() {
		return name;
	}


	public void setName(String name) {
		this.name = name;
	}


	public String getExamType() {
		return examType;
	}


	public void setExamType(String examType) {
		this.examType = examType;
	}


	public Boolean getIsPublished() {
		return isPublished;
	}


	public void setIsPublished(Boolean isPublished) {
		this.isPublished = isPublished;
	}


	public Boolean getResultPublished() {
		return resultPublished;
	}


	public void setResultPublished(Boolean resultPublished) {
		this.resultPublished = resultPublished;
	}


	public String getSectionId() {
		return sectionId;
	}


	public void setSectionId(String sectionId) {
		this.sectionId = sectionId;
	}


	public Date getExamDate() {
		return examDate;
	}


	public void setExamDate(Date examDate) {
		this.examDate = examDate;
	}


	public Integer getStatus() {
		return status;
	}


	public void setStatus(Integer status) {
		this.status = status;
	}


	public Section getSection() {
		return section;
	}


	public void setSection(Section section) {
		this.section = section;
	}


	
}
